{include file="biz/biz_header.html"} 
<link rel="stylesheet" type="text/css" href="{$TMPL}/css/biz_join.css" />
<script type="text/javascript" src="{$TMPL}/js/biz_join.js"></script>
<style type="text/css">
    td span label{float:left; padding:3px; margin:2px; background:#E6E6E6; cursor:pointer; display:inline-block; }
    td span label.active{background:#F60; color:#fff;}
    #container{height:200px; width: 200px; float:left;}  
    #container_front{width: 600px; height:500px; border: 1px solid #000; position: absolute; top: 10px; background-color: #fff; overflow: hidden;}
    #container_m{ width: 550px; height: 450px; margin: 0 auto;}
    #cancel_btn{display: block; width: 600px; height: 18px; line-height: 18px; text-align: right;}
</style>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.2"></script> 
<script type="text/javascript" src="{$TMPL}/js/biz.location.map.js"></script> 
<script type="text/javascript">
	var blue_point = "{$APP_ROOT}/system/blue_point.png";
	var red_point = "{$APP_ROOT}/system/red_point.png";
	$(document).ready(function(){
		$("form").bind("submit",function(){
			if($.trim($("input[name='name']").val())=='')
			{
				$.showErr("请填写商家名称",function(){
					$("input[name='name']").focus();
				});
				return false;
			}
			if($.trim($("input[name='address']").val())=='')
			{
				$.showErr("请填写商家地址",function(){
					$("input[name='address']").focus();
				});
				return false;
			}
			if($.trim($("input[name='tel']").val())=='')
			{
				$.showErr("请填写商家电话",function(){
					$("input[name='tel']").focus();
				});
				return false;
			}
		});
		 $("#mark_map").bind("click",function(){  
		 	var api_address = $("input[name='address']").val();
			var city=$("select[name='city_id']").find("option:selected").html();

			if ($.trim(api_address) == '') {
				$.showErr("请先输入地址");
			}
			else 
			{
				search_api(api_address, city);
			}
        });
		$("#container_front").hide();
        $("#cancel_btn").bind("click",function(){
			$("#container_front").hide();
		});
        $("input[name='chang_api']").bind("click",function(){ 
            editMap($("input[name='xpoint']").attr('value'),$("input[name='ypoint']").attr('value'));
        });
		
		
	});
</script>
<div class="blank"></div>
<div class="wrap clearfix wb biz-wrap">
{include file="biz/biz_step_nav.html"}
<div class="blank"></div>
<form method="post" action="{url x="biz" r="join#step2"}" name="biz_publish" >
				<table cellspacing="0" cellpadding="0" border="0" class="data-table" style="margin:0px auto;">
					<tr>
						<td class="dleft">商户名称：</td>
						<td>
							<input type="text" value="" class="f-input" id="name" name="name" size="80" tabindex="1">
							<span class="red">&nbsp;&nbsp; 必需填写 </span>
						</td>
					</tr>
					<tr>
						<td class="dleft">商户类型：</td>
						<td>
							 <select name="deal_type">
								<option value="0">餐厅</option>
								<option value="1">KTV</option>
							</select>
							
						</td>
					</tr>
					<tr>
						<td class="dleft">所属城市：</td>
						<td>
							 <select name="city_id">
								{foreach from=$city_list item=city_item}
								<option value="{$city_item.id}">{$city_item.name}</option>
								{/foreach}
							</select>
							
							<span id="area">
								
							</span>
						</td>
					</tr>
					
					<tr id="region_mark" style="display:none;">
						<td class="dleft">商圈/地标：</td>
						<td class="cnt">
							
						</td>
					</tr>
					<tr id="big_cate">
						<td class="dleft">所属分类：</td>
						<td class="cnt">
							<select name="deal_cate_id">
								{foreach from=$cate_list item=cate_item}
								<option value="{$cate_item.id}">{$cate_item.name}</option>
								{/foreach}
							</select>
						</td>
					</tr>
					
					<tr id="sub_cate" style="display:none;">
						<td class="dleft">所属子类：</td>
						<td class="cnt">
							
						</td>
					</tr>
					
					<tr>
						<td class="dleft">商户地址：</td>
						<td>
							<input type="text" value="" class="f-input" id="address" name="address" size="80" tabindex="1">
							<span class="red">&nbsp;&nbsp; <a href="javascript:void(0);" id="mark_map">在地图上标注</a> </span>
							
							<div style="height:10px; clear:both;"></div>
			                <div id="container" style="overflow-x: hidden; overflow-y: hidden; position: relative; z-index: 0; background-color: rgb(243, 241, 236); color: rgb(0, 0, 0); text-align: left; "><div style="overflow-x: visible; overflow-y: visible; position: absolute; z-index: 0; left: 0px; top: 0px; cursor: url(http://api.map.baidu.com/images/openhand.cur), default; "><div class="BMap_mask" style="position: absolute; left: 0px; top: 0px; z-index: 9; overflow-x: hidden; overflow-y: hidden; -webkit-user-select: none; width: 200px; height: 200px; "></div><div style="position: absolute; height: 0px; width: 0px; left: 0px; top: 0px; z-index: 200; "><div style="position: absolute; height: 0px; width: 0px; left: 0px; top: 0px; z-index: 800; "></div><div style="position: absolute; height: 0px; width: 0px; left: 0px; top: 0px; z-index: 700; "><span class="BMap_Marker BMap_noprint" unselectable="on" "="" style="position: absolute; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; cursor: pointer; background-image: url(http://api.map.baidu.com/images/blank.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; width: 19px; height: 25px; left: 90px; top: 75px; z-index: -5215540; background-position: initial initial; background-repeat: initial initial; " title=""></span></div><div style="position: absolute; height: 0px; width: 0px; left: 0px; top: 0px; z-index: 600; "></div><div style="position: absolute; height: 0px; width: 0px; left: 0px; top: 0px; z-index: 500; "></div><div style="position: absolute; height: 0px; width: 0px; left: 0px; top: 0px; z-index: 400; "><span class="BMap_Marker" unselectable="on" style="position: absolute; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; width: 0px; height: 0px; left: 90px; top: 75px; z-index: -5215540; "><div style="position: absolute; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; width: 19px; height: 25px; overflow-x: hidden; overflow-y: hidden; "><img src="http://api.map.baidu.com/images/marker_red_sprite.png" style="border:none;left:0px; top:0px; position:absolute;"></div></span></div><div style="position: absolute; height: 0px; width: 0px; left: 0px; top: 0px; z-index: 300; "><span unselectable="on" style="position: absolute; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; width: 20px; height: 11px; left: 94px; top: 89px; "><div style="position: absolute; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; width: 20px; height: 11px; overflow-x: hidden; overflow-y: hidden; "><img src="http://api.map.baidu.com/images/marker_red_sprite.png" style="border:none;left:-19px; top:-13px; position:absolute;"></div></span></div><div style="position: absolute; height: 0px; width: 0px; left: 0px; top: 0px; z-index: 200; "></div></div><div style="position: absolute; top: 0px; left: 0px; z-index: 1; "><div style="position: absolute; z-index: -100; left: 100px; top: 100px; "><img style="position: absolute; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; width: 256px; height: 256px; left: -142px; top: -337px; opacity: 1; " src="http://q8.baidu.com/it/u=x=12975;y=2920;z=16;v=010;type=web&amp;fm=44"><img style="position: absolute; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; width: 256px; height: 256px; left: -142px; top: -81px; opacity: 1; " src="http://q7.baidu.com/it/u=x=12975;y=2919;z=16;v=010;type=web&amp;fm=44"></div></div><div style="position: absolute; top: 0px; left: 0px; z-index: 2; "></div></div><div style="height: 32px; position: absolute; z-index: 10; -webkit-text-size-adjust: none; right: auto; top: auto; bottom: 0px; left: 1px; display: none; " class=" anchorBL"><a title="到百度地图查看此区域" target="_blank" href="http://map.baidu.com/?sr=1" style="outline-style: none; outline-width: initial; outline-color: initial; "><img style="border:none;width:77px;height:32px" src="http://api.map.baidu.com/images/copyright_logo.png"></a></div><div id="zoomer" style="position:absolute;z-index:0;top:0px;left:0px;overflow:hidden;visibility:hidden;cursor:url(http://api.map.baidu.com/images/openhand.cur) 8 8,default"><div class="BMap_zoomer" style="top:0;left:0;"></div><div class="BMap_zoomer" style="top:0;right:0;"></div><div class="BMap_zoomer" style="bottom:0;left:0;"></div><div class="BMap_zoomer" style="bottom:0;right:0;"></div></div><div unselectable="on" class=" BMap_stdMpCtrl BMap_stdMpType0 BMap_noprint anchorTL" style="width: 52px; height: 233px; position: absolute; z-index: 1100; -webkit-text-size-adjust: none; bottom: auto; right: auto; top: 10px; left: 10px; "><div class="BMap_stdMpPan"><div class="BMap_button BMap_panN" title="向上平移"></div><div class="BMap_button BMap_panW" title="向左平移"></div><div class="BMap_button BMap_panE" title="向右平移"></div><div class="BMap_button BMap_panS" title="向下平移"></div><div class="BMap_stdMpPanBg BMap_smcbg"></div></div><div class="BMap_stdMpZoom" style="height: 174px; width: 52px; "><div style="height: 174px; width: 37px; "><div class="BMap_button BMap_stdMpZoomIn" title="放大一级"><div class="BMap_smcbg"></div></div><div class="BMap_button BMap_stdMpZoomOut" title="缩小一级"><div class="BMap_smcbg"></div></div></div><div class="BMap_stdMpSlider" style="height: 140px; "><div class="BMap_stdMpSliderBgTop" style="height: 131px; "><div class="BMap_smcbg"></div></div><div class="BMap_stdMpSliderBgBot" style="top: 131px; "><div class="BMap_smcbg"></div></div><div class="BMap_stdMpSliderMask" title="放置到此级别"></div><div class="BMap_stdMpSliderBar" title="拖动缩放" style="cursor: url(http://api.map.baidu.com/images/openhand.cur), default; top: 22px; "><div class="BMap_smcbg"></div></div></div><div class="BMap_zlHolder"><div class="BMap_zlSt"><div class="BMap_smcbg"></div></div><div class="BMap_zlCity"><div class="BMap_smcbg"></div></div><div class="BMap_zlProv"><div class="BMap_smcbg"></div></div><div class="BMap_zlCountry"><div class="BMap_smcbg"></div></div></div></div></div><div unselectable="on" class=" BMap_cpyCtrl anchorBL" style="cursor: default; white-space: nowrap; color: black; background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; font: normal normal normal 11px/15px arial, sans-serif; position: absolute; z-index: 10; -webkit-text-size-adjust: none; right: auto; top: auto; bottom: 2px; left: 4px; background-position: initial initial; background-repeat: initial initial; "><span _cid="1"><span style="font-size:11px">© 2012 Baidu</span></span></div></div>
							<div class="blank1"></div>
			                <input type="button" value="手动修改" name="chang_api" id="chang_api">
			                <div style="position:relative; top:-400px;">
			                    <div id="container_front" style="display: none; ">
			                        <a href="#" id="cancel_btn">取消</a>
			                        <div id="container_m"></div>
			                    </div>
			                </div>
							<input type="hidden" name="xpoint" value="">
							<input type="hidden" name="ypoint" value="">
						</td>
					</tr>
					<tr>
						<td class="dleft">人均：</td>
						<td>
							<select name="avg_price">
								<option value="0">请选择人均</option>
                                <option value="1">50以下</option>
                                <option value="2">51-100</option>
                                <option value="3">101-200</option>
                                <option value="4">201-400</option>
                                <option value="5">400以上</option>
							</select>
						</td>
					</tr>
					<tr>
						<td class="dleft">商户电话：</td>
						<td>
							<input type="text" value="" class="f-input" id="tel" name="tel" size="80" tabindex="1">
					
						</td>
					</tr>
									
					<tr>
						<td class="dleft">营业时间：</td>
						<td>
							<input type="text" value="" class="f-input" id="open_time" name="open_time" size="80" tabindex="1">
			
						</td>
					</tr>
					
					<tr>
						<td class="dleft">停车：</td>
						<td>
							<input type="text" value="" class="f-input" id="stop" name="stop" size="80" tabindex="1">
			
						</td>
					</tr>
					
					<tr id="ct_seat">
						<td class="dleft">餐位情况：</td>
						<td>
							大厅：<input type="text" value="0" class="f-input" id="hall" name="hall" size="10" tabindex="1">个餐坐<br>
							包厢：<input type="text" value="0" class="f-input" id="box" name="box" size="10" tabindex="1">个
						</td>
					</tr>
					
					<tr id="ct_seat_box" style="display:none;">
						<td class="dleft">包厢情况：</td>
						<td>
							小包厢：<input type="text" value="0" class="f-input" id="s_box" name="s_box" size="10" tabindex="1">个<br>
							中包厢：<input type="text" value="0" class="f-input" id="m_box" name="m_box" size="10" tabindex="1">个<br>
							大包厢：<input type="text" value="0" class="f-input" id="b_box" name="b_box" size="10" tabindex="1">个<br>
							VIP包厢：<input type="text" value="0" class="f-input" id="v_box" name="v_box" size="10" tabindex="1">个
						</td>
					</tr>
					
					<tr>
						<td class="dleft">其他：</td>
						<td>
							<label>银行卡支付：<input type="checkbox" value="1" class="f-check" id="is_bank" name="is_bank"></label>
							<label id="lb_no_smoking">有无吸烟区:<input type="checkbox" value="1" class="f-check" name="no_smoking"></label>
							<label>在线预订：<input type="checkbox" value="1" class="f-check" id="one_line_order" name="one_line_order"/></label>
						</td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td><input type="submit" value="提交" class="biz_pub_btn" /></td>
					</tr>
				</table>
			</form>
</div>
<div class="blank"></div>
{include file="biz/biz_footer.html"} 